package com.bkhc.common.repository;

import com.bkhc.common.entity.Lookup;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface LookupRepository extends JpaRepository<Lookup,String> , JpaSpecificationExecutor<Lookup> {
    @Query("select p from Lookup p where p.itemClass=:itemClass order by p.sort")
    List<Lookup> findByItemClass(@Param("itemClass") String itemClass);
}
